import { Rule, RuleType } from "@midwayjs/validate";

export class CreateCustomerDTO {
    @Rule(RuleType.number().required())
    userId: number;

    @Rule(RuleType.string().optional())
    name: string;

    @Rule(RuleType.string().optional())
    phone: string;

    @Rule(RuleType.string().optional())
    remark: string;

    @Rule(RuleType.string().optional())
    position: string;
}

export class UpdateCustomerDTO {
    @Rule(RuleType.number().required())
    id: number;

    @Rule(RuleType.string().optional())
    name: string;

    @Rule(RuleType.string().optional())
    phone: string;

    @Rule(RuleType.string().optional())
    remark: string;

    @Rule(RuleType.string().optional())
    position: string;

    @Rule(RuleType.boolean().optional())
    isStar: boolean;

    @Rule(RuleType.number().valid(0, 1).optional())
    status: number;
}

